In a magnetic disk device, dynamic flying height (DFH) control is sometimes performed. In the DFH control, magnetic spacing of a magnetic head from a magnetic disk is adjusted by energizing a heater mounted on a head slider and thermally expanding the head slider. In the magnetic disk device, preheating of the head slider is started from a position several tracks before a target track, for example.